<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<div class="page_title">
	<s:if test="%{id == null}">
		Add new application user
	</s:if>
	<s:else>
		Edit user '<s:property value="user.firstName"/> <s:property value="user.lastName"/>'
	</s:else>
</div>

<div class="smallForm">
	<s:actionerror/>

	<s:form method="post" action="saveUser">
		<s:hidden name="user.id"/>
		<s:hidden name="user.password"/>
		<s:textfield cssClass="txt" name="user.login" label="Login"/>
		<s:textfield cssClass="txt" name="user.firstName" label="First Name"/>
		<s:textfield cssClass="txt" name="user.lastName" label="Last Name"/>
		<s:textfield cssClass="txt" name="user.email" label="EMail"/>
		<s:password cssClass="txt" name="password" label="Password"/>
		<s:password cssClass="txt" name="passwordConfirm" label="Confirm Password"/>
		<s:checkbox name="user.admin" label="Is Admin" />
		<s:component template="controlheader.ftl"/>
			<s:submit theme="simple" cssClass="btn" value="%{'save'}" />
			<button class="btn" onclick="document.location='<s:url namespace="/admin" action="listUsers"/>';return false;">cancel</button>
		<s:component template="controlfooter.ftl"/>
	</s:form>
</div>
